Architecture Center
Building an Auto Scaling WordPress Website on Alibaba Cloud

Building an Auto Scaling WordPress Website on Alibaba Cloud

Overview
For online businesses of websites deployed using WordPress, traffic fluctuations are unavoidable. They can occur at predictable and unpredictable times, and customers may experience high latency if the traffic volume spikes during a certain period. It is crucial to deploy an architecture that automatically scales in response to traffic volume changes to provide a consistently high performance service with minimized cost and effort.
This solution allows you to automatically adjust the compute capacity in response to traffic fluctuations and helps you maintain a balance between performance and cost with scaling rules. It provides high availability and fault tolerance by evenly distributing ECS instances across zones as the compute capacity is scaled, supports database scaling to meet increased data demands, and supports Redis caching across zones to ease the load on the database.
Reference Architecture
The following architecture diagram demonstrates how to deploy a WordPress website and applications on an auto scaling architecture. In the scenario demonstrated by this diagram:
Auto Scaling adjusts the number of ECS instances to ensure optimal performance with minimized costs.
ECS instances are deployed across two zones to ensure high application availability.
Data caching is provided by an ApsaraDB for Redis instance in a multi-zone deployment.
Steps
Deploy Resources
Use Terraform to provision VPC, SLB, EIP, ESS, ECS, Redis and PolarDB instances in this solution against the .tf file.
Run Demo
1. Install Apache HTTP Server and PHP on ECS .
2. Install and configure WordPress on ECS.
3. Configure Redis caching.
4. (Optional) Make custom ECS image for auto scaling.
5. (Optional) Setup Auto Scaling (ESS) for ECS auto scaling.
6. (Optional) Simulate fluctuating traffic to trigger auto scaling.
Please refer to Deployment Guide for a detailed description of the steps.

Reach Alibaba Cloud experts for support

Contact Us
phone Contact Us